Boolean

Returns the Boolean representation of a value. The following values are valid.

Value Notes
Number 0 is False. All other values are True.
String Matches "True" or "False". Strings are not case sensitive. White space is trimmed. If "True" or "False" is not matched, QA Wizard Pro tries to convert the value to a number.
Object Converts to strings before evaluated.
Null Converts to 0 and returns False.

Syntax

Boolean(Value)

Arguments

Argument Description
Value Value to represent as a Boolean.

Return value

Value Description
True Value matches True for the data type.
False Value matches False for the data type.

Example

' Returns True

boolVal = Boolean(1)

PrintLn("Should be True: " & boolVal)

' Returns True

boolVal = Boolean("TRUE")

PrintLn("Should be True: " & boolVal)

' Returns False

boolVal = Boolean(0)

PrintLn("Should be False: " & boolVal)

' Returns False

boolVal = Boolean("false")

PrintLn("Should be False: " & boolVal)